import { http } from '@/utils/http'

export default {
  dict: {
    key: 'value',
    label: 'label',
    listPage: {
      title: '',
    },
    search: false,
  },
  // 运营主体
  operatingSubject: {
    key: 'id',
    label: 'sourceSubject',
    component: 'default',
    search: false,
    listPage: {
      title: '选择运营主体',
    },
    api: (data: any) => {
      return new Promise((resolve) => {
        http({
          method: 'POST',
          url: '/V5/channelAccount/pageList',
          data,
        }).then((res: any) => {
          res.result.data.forEach((item: any) => {
            item.sourceSubject = `${item.sourceName}-${item.subject}`
          })
          resolve(res)
        })
      })
    },
  },
  // 选择门店
  site: {
    key: 'id',
    label: 'siteName',
    desc: 'address',
    keyword: 'siteName',
    component: 'default',
    listPage: {
      title: '选择门店',
      placeholder: '请输入门店名称',
    },
    params: {
      siteStatusList: ['10'], // 可用
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/siteLease/searchForStaff',
        data,
      })
    },
  },
  // 选择门店
  site_all: {
    key: 'id',
    label: 'siteName',
    desc: 'address',
    keyword: 'siteName',
    component: 'default',
    listPage: {
      title: '选择门店',
      placeholder: '请输入门店名称',
    },
    params: {},
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/siteLease/searchForStaff',
        data,
      })
    },
  },
  // 选择员工
  staff: {
    key: 'id',
    label: 'realname',
    desc: 'address',
    keyword: 'likeRealname',
    component: 'staff',
    listPage: {
      title: '选择员工',
      placeholder: '请输入员工名称',
    },
    params: {},
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/staff/selectStaffByOrgId',
        data,
      })
    },
  },
  // 同步人员
  sync_staff: {
    key: 'id',
    label: 'realname',
    desc: 'address',
    keyword: 'keyword',
    component: 'staff',
    listPage: {
      title: '选择员工',
      placeholder: '请输入员工名称',
    },
    api: (data: any) => http({ method: 'POST', url: '/V5/staff/searchEnterpriseStaffLimit', data }),
  },
  // 供应商-年检
  supplierInspect: {
    key: 'id',
    label: 'supplierName',
    desc: 'address',
    keyword: 'supplierName',
    component: 'default',
    listPage: {
      title: '年检厂',
      placeholder: '请输入年检厂名称',
    },
    extraButton: {
      type: 'addNewSupplier',
      supplierType: 6,
    },
    params: {
      supplierType: 6,
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/supplier/findList',
        data,
      })
    },
  },
  // 修理厂-保养
  supplierMain: {
    key: 'id',
    label: 'supplierName',
    desc: 'address',
    keyword: 'supplierName',
    component: 'supplierMain',
    listPage: {
      title: '修理厂',
      placeholder: '请输入修理厂名称',
    },
    extraButton: {
      type: 'addNewSupplier',
      supplierType: 1,
    },
    params: {
      supplierType: 1,
      status: 1,
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/supplier/findList',
        data,
      })
    },
  },
  // 修理厂-维修
  supplierRepair: {
    key: 'id',
    label: 'supplierName',
    desc: 'address',
    keyword: 'supplierName',
    component: 'supplierRepair',
    listPage: {
      title: '修理厂',
      placeholder: '请输入修理厂名称',
    },
    extraButton: {
      type: 'addNewSupplier',
      supplierType: 0,
    },
    params: {
      supplierType: 0,
      status: 1,
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/supplier/findList',
        data,
      })
    },
  },
  // 年检
  supplierInspects: {
    key: 'id',
    label: 'supplierName',
    desc: 'address',
    keyword: 'supplierName',
    component: 'supplierInspect',
    listPage: {
      title: '年检厂',
      placeholder: '请输入年检厂名称',
    },
    extraButton: {
      type: 'addNewSupplier',
      supplierType: 6,
    },
    params: {
      supplierType: 6,
      status: 1,
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/supplier/findList',
        data,
      })
    },
  },
  // 车牌号
  licenseNo: {
    key: 'id',
    label: 'licenseNo',
    desc: 'modelName',
    keyword: 'licenseNoLike',
    component: 'licenseNo',
    listPage: {
      title: '选择车牌号',
      placeholder: '请输入车牌号',
    },
    params: {
      pageSize: 100,
      pageNumber: 1,
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/carInfo/getLicenseNoLike',
        data,
      })
    },
  },
  // 城市
  city: {
    key: 'code',
    label: 'name',
    keyword: 'name',
    component: 'default',
    listPage: {
      title: '选择城市',
      placeholder: '请输入城市名称',
    },
    params: {},
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/area/findCitysByName',
        data,
      })
    },
  },
  // 查找车辆对应的订单
  orderCar: {
    key: 'orderId',
    label: 'orderNo',
    desc: 'modelName',
    keyword: 'orderCode',
    component: 'order',
    search: false,
    listPage: {
      title: '选择关联订单',
      placeholder: '请输入关联订单号',
    },
    params: {},
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/carInfo/findOrder',
        data,
      })
    },
  },
  // 查找车辆在指定时间履行的订单
  orderByTimeAndCar: {
    key: 'orderId',
    label: 'orderNo',
    desc: 'modelName',
    keyword: 'orderCode',
    component: 'order',
    search: false,
    listPage: {
      title: '选择关联订单',
      placeholder: '请输入关联订单号',
    },
    params: {},
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/carInfo/findOrderInTime',
        data,
      })
    },
  },
  // 门店下车系列表
  carSeries_site: {
    key: 'id',
    label: 'seriesName',
    keyword: 'seriesName',
    component: 'carModel',
    listPage: {
      title: '选择车系',
      placeholder: '请输入车系名称',
    },
    params: {
      status: 1,
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/carModelSite/searchCarSeries',
        data,
      })
    },
  },
  // 企业查询关联车辆状态车系模糊查询
  carSeries_tenant: {
    key: 'id',
    label: 'seriesName',
    keyword: 'seriesName',
    component: 'carModel',
    listPage: {
      title: '选择车系',
      placeholder: '请输入车系名称',
    },
    params: {
      status: 1,
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/carModelTenant/searchCarSeries',
        data,
      })
    },
  },
  // 企业查询关联车辆状态车型模糊查询
  carModel_tenant: {
    key: 'id',
    label: 'modelName',
    keyword: 'modelName',
    component: 'carModel',
    listPage: {
      title: '选择车型',
      placeholder: '请输入车型名称',
    },
    params: {
      status: 1,
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/carModelTenant/searchCarModel',
        data,
      })
    },
  },
  // 车型列表
  carModel: {
    key: 'id',
    label: 'modelName',
    keyword: 'modelName',
    component: 'carModel',
    listPage: {
      title: '选择车型',
      placeholder: '请输入车型名称',
    },
    params: {
      status: 1,
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/carModelTenant/searchCarModel',
        data,
      })
    },
  },
  multiple_carModel: {
    key: 'id',
    label: 'modelName',
    keyword: 'modelName',
    component: 'carModel',
    listPage: {
      title: '选择车型',
      placeholder: '请输入车型名称',
    },
    params: {
      status: 1,
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/carModelTenant/searchCarModel',
        data,
      })
    },
  },
  // 门店下车型列表
  carModel_site: {
    key: 'id',
    label: 'modelName',
    keyword: 'modelName',
    component: 'carModel',
    listPage: {
      title: '选择车型',
      placeholder: '请输入车型名称',
    },
    params: {
      status: 1,
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/carModelSite/searchCarModel',
        data,
      })
    },
  },
  // 门店下车型列表
  multiple_carModel_site: {
    key: 'id',
    label: 'modelName',
    keyword: 'modelName',
    component: 'carModel',
    listPage: {
      title: '选择车型',
      placeholder: '请输入车型名称',
    },
    params: {
      status: 1,
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/carModelSite/searchCarModel',
        data,
      })
    },
  },
  // 车库选择
  carGarage: {
    key: 'id',
    label: 'modelName',
    keyword: 'modelName',
    component: 'carGarage',
    listPage: {
      title: '新增车型',
      placeholder: '请输入车型名称',
    },
    params: {
      status: 1,
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/carModel/searchCarModel',
        data,
      })
    },
  },
  // 借调同行
  peerAll: {
    key: 'id',
    label: 'industryName',
    keyword: 'industryName',
    component: 'peer',
    listPage: {
      title: '选择同行',
      placeholder: '请输入',
    },
    params: {
      pageNumber: 1,
      pageSize: 200,
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/sameIndustryInfo/findPageList',
        data,
      })
    },
  },

  // 汽车销售
  carModelSale: {
    key: 'id',
    label: 'supplierName',
    keyword: 'supplierName',
    component: 'carModelSale',
    listPage: {
      title: '选择汽车销售',
      placeholder: '请输入汽车销售名称',
    },
    params: {
      supplierType: 3,
      status: 1,
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/supplier/findList',
        data,
      })
    },
  },
  // 供应商
  customerNameSelect: {
    key: 'id',
    label: 'supplierName',
    keyword: 'supplierName',
    component: 'carModelSale',
    listPage: {
      title: '选择客户名称',
      placeholder: '请输入客户名称',
    },
    params: {
      supplierType: 3,
      status: 1,
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/supplier/findList',
        data,
      })
    },
  },
  // 保险公司
  supplierInsure: {
    key: 'id',
    label: 'supplierName',
    desc: 'address',
    keyword: 'supplierName',
    component: 'supplierInsure',
    listPage: {
      title: '保险公司',
      placeholder: '请输入保险公司名称',
    },
    extraButton: {
      type: 'addNewSupplier',
      supplierType: 7,
    },
    params: {
      supplierType: 7,
      status: 1,
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/supplier/findList',
        data,
      })
    },
  },
  // GPS设备
  carDevice: {
    key: 'id',
    label: 'vehicleSelectStr',
    keyword: 'vehicleNumLike',
    component: 'carVehicle',
    listPage: {
      title: '选择GPS设备',
      placeholder: '请输入GPS设备编号',
    },
    params: {
      autoincrement: 0,
      statusList: [0, 1],
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/carVehicle/getList',
        data,
      })
    },
  },
  // 企业列表
  member_clientInfo: {
    key: 'id',
    label: 'clientName',
    keyword: 'clientNameLike',
    params: {},
    listPage: {
      title: '选择企业',
      placeholder: '请输入企业名称',
    },
    component: 'default',
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/clientInfo/findByClientName',
        data,
      })
    },
  },
  // 客户（企业）
  client: {
    key: 'id',
    label: 'clientName',
    keyword: 'clientNameLike',
    component: 'carModel',
    listPage: {
      title: '选择所属企业',
      placeholder: '请输入企业名称',
    },
    params: {},
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/clientInfo/findByClientName',
        data,
      })
    },
  },
  // 根据员工查询门店
  site_listBystaff: {
    label: 'siteName',
    keyword: 'siteName',
    key: 'id',
    component: 'default',
    listPage: {
      title: '选择门店',
      placeholder: '请输入门店名称',
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/siteLease/searchForStaff',
        data,
      })
    },
  },
  // 查询所有门店
  site_lease_list: {
    label: 'siteName',
    keyword: 'siteNameLike',
    key: 'id',
    mode: 'each',
    data: {
      siteType: 40,
    },
    listPage: {
      title: '选择门店',
      placeholder: '请输入门店名称',
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/siteLease/getSiteList',
        data,
      })
    },
  },
  // 个人会员列表
  member_list: {
    label: 'memberName',
    labelFn: (item: any) => {
      return item.memberName + ' ' + item.phone
    },
    listPage: {
      title: '选择会员',
      placeholder: '请输入会员姓名/手机号',
    },
    keyword: 'memberNamePhoneLike',
    key: 'id',
    mode: 'each',
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/czcCustMember/findQuery',
        data,
      })
    },
  },
  // 个人会员列表
  member_order_list: {
    label: 'memberName',
    labelFn: (item: any) => {
      return item.memberName + ' ' + item.phone
    },
    listPage: {
      title: '选择会员',
      placeholder: '请输入会员姓名/手机号',
    },
    keyword: 'memberNamePhoneLike',
    key: 'id',
    mode: 'each',
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/czcCustMember/findOrderQuery',
        data,
      })
    },
  },
  // 获取门店权限下的员工
  staff_org: {
    key: 'id',
    label: 'realname',
    keyword: 'likeRealname',
    component: 'staff',
    listPage: {
      title: '选择签约人',
      placeholder: '请输入签约人姓名',
    },
    params: {},
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/staff/selectStaffByOrgId',
        data,
      })
    },
  },
  // 具体代办方式
  specific_way: {
    key: 'value',
    label: 'name',
    component: 'default',
    listPage: {
      title: '选择具体代办方式',
    },
    search: false,
    params: {
      codeList: ['violation_agent_type'],
      includeDisabled: 1,
    },
    api: (data: any) => {
      return new Promise((resolve) => {
        http({
          method: 'POST',
          url: '/dict/getInfo',
          data,
        }).then((res: any) => {
          res.result = res.result['violation_agent_type']
          resolve(res)
        })
      })
    },
  },
  // 自定义标签
  customLabel: {
    key: 'value',
    label: 'name',
    component: 'default',
    listPage: {
      title: '选择标签',
    },
    params: {
      codeList: ['short_order_custom_label'],
      includeDisabled: 1,
    },
    search: false,
    api: (data: any) => {
      return new Promise((resolve) => {
        http({
          method: 'POST',
          url: '/dict/getInfo',
          data,
        }).then((res: any) => {
          res.result = res.result['short_order_custom_label']
          resolve(res)
        })
      })
    },
  },
  // 长短租添加标签
  customLabelAdd: {
    key: 'value',
    label: 'name',
    component: 'default',
    listPage: {
      title: '选择标签',
    },
    params: {
      codeList: ['violation_label_type'],
      includeDisabled: 1,
    },
    search: false,
    api: (data: any) => {
      return new Promise((resolve) => {
        http({
          method: 'POST',
          url: '/dict/getInfo',
          data,
        }).then((res: any) => {
          res.result = res.result['violation_label_type'].filter((item: any) => item.isEnabled == 1)
          resolve(res)
        })
      })
    },
  },
  // 失信类型
  dishonestyType: {
    key: 'value',
    label: 'label',
    component: 'carModel',
    listPage: {
      title: '选择失信类型',
    },
    search: false,
  },
  // 查询关联门店下的所有员工（包括离职的）
  staff_all_bysite: {
    key: 'id',
    label: 'realname',
    keyword: 'likeRealname',
    component: 'staff',
    listPage: {
      title: '选择员工',
      placeholder: '请输入员工姓名',
    },
    params: {},
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/staff/selectAuthOrgStaff',
        data,
      })
    },
  },
  // 指派负责人（不包括离职的）
  reassignment_staff_list_multiple: {
    key: 'id',
    label: 'realname',
    keyword: 'likeRealname',
    component: 'staff',
    listPage: {
      title: '选择员工',
      placeholder: '请输入员工姓名',
    },
    params: {},
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/carHousekeep/selectStaffByOrgId',
        data,
      })
    },
  },
  // 数据看板门店
  sitedataboard: {
    key: 'id',
    label: 'siteName',
    keyword: 'siteName',
    // desc: 'address',
    component: 'default',
    listPage: {
      title: '选择门店',
      placeholder: '请输入门店名称',
    },
    params: {
      siteStatusList: ['10'], // 可用
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/siteLease/searchForStaff',
        data,
      })
    },
  },
  // 订单获取方式模糊搜索
  order_acquisition: {
    key: 'value',
    label: 'name',
    keyword: 'nameLike',
    component: 'default',
    listPage: {
      title: '选择订单获取方式',
      placeholder: '请输入订单获取方式名称',
    },
    params: {},
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/czsOrderInfo/getOrderAcquisitionTypeLike',
        data,
      })
    },
  },
  // 运营成本 before
  // 关联工单号
  getWorkCode: {
    key: 'id',
    label: 'workCode',
    keyword: 'workCode',
    component: 'default',
    listPage: {
      title: '选择关联工单号',
      placeholder: '请选择',
    },
    params: {
      ifCreateCost: 1,
      pageNumber: 1,
      pageSize: 200,
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/workOrderV5/getPageList',
        data,
      })
    },
  },
  // 员工下的机构组织列表
  org_listByStaff: {
    key: 'id',
    label: 'orgName',
    keyword: 'orgName',
    component: 'default',
    listPage: {
      title: '选择费用产生机构',
      placeholder: '请选择',
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/org/currentList',
        data,
      })
    },
  },
  org_selectAuthListByOrgNameLike: {
    key: 'orgId',
    label: 'orgName',
    keyword: 'orgNameLike',
    component: 'default',
    listPage: {
      title: '选择全部机构',
      placeholder: '请选择',
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/org/selectAuthListByOrgNameLike',
        data,
      })
    },
  },
  org_tipslistByStaff: {
    key: 'id',
    label: 'orgName',
    keyword: 'orgName',
    component: 'default',
    listPage: {
      title: '选择机构',
      placeholder: '请选择',
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/org/currentList',
        data,
      })
    },
  },
  // 新增报销单/付款单员工下的机构组织列表
  org_add_listByStaff: {
    key: 'orgId',
    label: 'orgName',
    keyword: 'orgNameLike',
    component: 'default',
    listPage: {
      title: '选择费用产生机构',
      placeholder: '请选择',
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/org/selectAuthListByOrgNameLike',
        data,
      })
    },
  },
  // 短租关联业务单号
  getShortCode: {
    key: 'id',
    label: 'codeMemberName',
    keyword: 'codeMemberNameLike',
    component: 'default',
    listPage: {
      title: '选择关联业务单号',
      placeholder: '请选择',
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/sOrder/getAllList',
        data,
      })
    },
  },
  // 长租关联业务单号
  getLongCode: {
    key: 'id',
    label: 'codeMemberName',
    keyword: 'codeMemberNameLike',
    component: 'default',
    listPage: {
      title: '选择关联业务单号',
      placeholder: '请选择',
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/czsOrderInfo/getAllList',
        data,
      })
    },
  },
  // 支出费项下拉框
  cost_fee: {
    key: 'value',
    label: 'name',
    keyword: 'nameLike',
    component: 'default',
    listPage: {
      title: '选择支出费项',
      placeholder: '请选择',
    },
    params: {
      dictCode: 'cost_fee_item',
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/dict/getSelectInfo',
        data,
      })
    },
  },
  // 获取短租费用名称列表
  shortOrderBillfeeNameList: {
    key: 'value',
    label: 'name',
    keyword: 'name',
    component: 'default',
    listPage: {
      title: '选择费项',
      placeholder: '请选择',
    },
    api: (data: any) => {
      return new Promise((resolve) => {
        http({ method: 'POST', url: '/V5/shortOrderBill/feeNameList', data }).then((res: any) => {
          res.result = res.result.map((item: any) => {
            return {
              name: item,
              value: item,
            }
          })
          resolve(res)
        })
      })
    },
  },
  operate_staff_change: {
    key: 'id',
    label: 'realname',
    keyword: 'likeRealname',
    component: 'staff',
    listPage: {
      title: '选择审批人',
      placeholder: '请选择',
    },
    params: {
      pageNumber: 1,
      pageSize: 200,
      status: 1,
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/staff/pageList',
        data,
      })
    },
  },
  // 申请人搜索
  store_staff_list: {
    key: 'id',
    label: 'realname',
    keyword: 'likeRealname',
    component: 'staff',
    listPage: {
      title: '选择申请人',
      placeholder: '请选择',
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/staff/searchEnterpriseStaffLimit',
        data,
      })
    },
  },
  store_staff_list_Limit: {
    key: 'userId',
    label: 'realname',
    keyword: 'likeRealname',
    component: 'staff',
    listPage: {
      title: '选择',
      placeholder: '请选择',
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/staff/searchEnterpriseStaffLimit',
        data,
      })
    },
  },
  // 审批人搜索
  store_check_list: {
    key: 'id',
    label: 'realname',
    keyword: 'likeRealname',
    component: 'staff',
    listPage: {
      title: '选择审批人',
      placeholder: '请选择',
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/staff/searchEnterpriseStaffLimit',
        data,
      })
    },
  },
  // 换车人
  staff_list_changecar: {
    key: 'id',
    label: 'realname',
    keyword: 'likeRealname',
    component: 'staff',
    listPage: {
      title: '选择换车人',
      placeholder: '请选择',
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/carHousekeep/selectStaffByOrgId',
        data,
      })
    },
  },
  // 供应商列表
  supplier_list: {
    key: 'id',
    label: 'supplierName',
    keyword: 'supplierName',
    component: 'peer',
    params: {
      pageNumber: 1,
      pageSize: 200,
    },
    listPage: {
      title: '选择供应商',
      placeholder: '请输入',
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/supplier/getList',
        data,
      })
    },
  },
  // 运营成本 end
  // 查询指派人
  get_work_complete: {
    key: 'id',
    label: 'realname',
    keyword: 'staffName',
    component: 'staff',
    listPage: {
      title: '选择指派人',
      placeholder: '请输入指派人姓名',
    },
    params: {},
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/carHousekeep/getWorkComplete',
        data,
      })
    },
  },
  // 选择订单号
  all_replace_order_list: {
    key: 'orderId',
    label: 'orderCode',
    keyword: 'refCode',
    component: 'default',
    listPage: {
      title: '选择订单',
      placeholder: '请输入订单号',
    },
    params: {},
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/workOrderV5/getReplaceOrderNo',
        data,
      })
    },
  },
  /** 司机排班员工 */
  driver_schedule_staff: {
    key: 'id',
    label: 'realname',
    keyword: 'likeRealname',
    component: 'staff',
    listPage: {
      title: '选择员工',
      placeholder: '请输入员工姓名',
    },
    params: {},
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/V5/driverScheduling/selectStaffByOrgId',
        data,
      })
    },
  },
  // 员工-操作人
  staff_operator: {
    key: 'id',
    label: 'realname',
    keyword: 'realnameLike',
    component: 'staff',
    listPage: {
      title: '选择操作人',
      placeholder: '请输入操作人姓名',
    },
    api: (data: any) => {
      return http({
        method: 'POST',
        url: '/vwUser/queryRealNameLike',
        data,
      })
    },
  },

  target_channel_account: {
    key: 'id',
    label: 'sourceSubject',
    component: 'default',
    search: false,
    listPage: {
      title: '选择目标运营主体',
      placeholder: '请输入目标运营主体',
    },
    api: (data: any) => {
      return new Promise((resolve) => {
        http({ method: 'POST', url: '/V5/channelAccount/selectList', data }).then((res: any) => {
          res.result.forEach((item: any) => {
            item.sourceSubject = `${item.sourceName}-${item.subject}`
          })
          resolve(res)
        })
      })
    },
  },

  tenantPriceTemplate: {
    key: 'id',
    label: 'templateName',
    keyword: 'templateNameLike',
    component: 'default',
    params: {
      templateSort: 1,
    },
    listPage: {
      title: '选择车型价格模板',
      placeholder: '请输入',
    },
    api: (data: any) => http({ method: 'POST', url: '/V5/tenantPriceTemplate/selectList', data }),
  },

  deductionOrder: {
    key: 'orderId',
    label: 'orderCode',
    component: 'default',
    listPage: {
      title: '选择抵扣订单',
    },
    search: false,
  },
  channel_type: {
    key: 'value',
    label: 'name',
    component: 'default',
    listPage: {
      title: '选择渠道',
    },
    api: (data: any) => {
      return new Promise((resolve) => {
        http({ method: 'POST', url: '/V5/carStock/getEnums', data }).then((res: any) => {
          res.result.data = res.result.channelTypeEnum
          resolve(res)
        })
      })
    },
  },
}
